<#assign className = table.className>   
<#assign classNameLower = className?uncap_first> 
<#assign primaryKeyColumn = table.primaryKeyColumn>
/**
 * ${className}服务类
 * @author yanwl
 * @date ${.now?string("yyyy-MM-dd hh:mm:ss")}
*/
package ${basepackage}.service.impl;

import ${basepackage}.core.common.DaoHelper;
import ${basepackage}.model.pojo.${className};
import ${basepackage}.service.${className}Service;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;

@Service("${classNameLower}Service")
public class ${className}ServiceImpl implements ${className}Service{
	//声明工作空间
	private final static String nameSpace = "${basepackage}.mapper.${className}Mapper";
	
	@Override
	public boolean insert${className}(${className} ${classNameLower}) {
		return DaoHelper.insert(nameSpace, "insert${className}", ${classNameLower});
	}
	
	@Override
	public boolean delete${className}(${primaryKeyColumn.javaType} ${primaryKeyColumn.columnName}) {
		return DaoHelper.delete(nameSpace, "delete${className}", ${primaryKeyColumn.columnName});
	}

	@Override
	public boolean update${className}(${className} ${classNameLower}) {
		return DaoHelper.update(nameSpace, "update${className}", ${classNameLower});
	}
	
	@Override
	public ${className} select${className}ByPrimaryKey(${primaryKeyColumn.javaType} ${primaryKeyColumn.columnName}) {
		return (${className})DaoHelper.query(nameSpace, "select${className}ByPrimaryKey", ${primaryKeyColumn.columnName});
	}
	

	@SuppressWarnings("unchecked")
	@Override
	public List<${className}> selectAll${className}s() {
		return (List<${className}>)DaoHelper.list(nameSpace, "selectAll${className}s", "");
	}

	@Override
	public int select${className}TotalRows() {
		return DaoHelper.count(nameSpace, "select${className}TotalRows", "");
	}
}